package com.repairService.business;

import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;

/**
 * 应用模块名称
 *
 * @author Administrator
 * @since
 */
@SpringBootApplication
@ComponentScan("com.repairService")
@MapperScan("com.repairService.*.mapper")
public class BusinessWebApplication extends SpringBootServletInitializer {

    private static final Logger LOGGER = LoggerFactory.getLogger(BusinessWebApplication.class);

    public static void main(String[] args) {
        LOGGER.info("正在启基础服务......");
        SpringApplication.run(BusinessWebApplication.class, args);
        // todo 检查相关配置是否完整

        LOGGER.info("基础服务已启动完成......");
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(BusinessWebApplication.class);
    }

}
